<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>进货添加</title>
    <link href="/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/static/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/static/css/animate.css" rel="stylesheet">
    <link href="/static/css/style.css?v=4.1.0" rel="stylesheet">
</head>

<body class="gray-bg">
    <div class="container wrapper wrapper-content animated fadeInRight">
        <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>添加进货订单</h5><button onclick="javascript:location.reload();" type="button" class="btn btn-sm btn-outline btn-danger" style="margin-left:15px;margin-top: -6px;">刷 新</button>
            <span style="float:right;">
        </div>
        <div class="ibox-content">
            <form class="form-horizontal">
                <div class="form-group">
                    <label class="col-sm-3 control-label">种类选择</label>
                    <div class="col-sm-6">
                        <select class="form-control m-b" id="bankname">
                            <?php
                                foreach ($bankList as $bank) {
                                    echo "<option value='".$bank['id']."'>{$bank['bankname']}</option>";
                                }
                            ?>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">销售单价</label>
                    <div class="col-sm-6">
                        <input type="number" id="price" placeholder="请输入进货单价"  class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">销售数量</label>
                    <div class="col-sm-6">
                        <input type="number" id="number" placeholder="请输入进货数量" class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">进货人</label>
                    <div class="col-sm-6">
                        <input id="person" type="text" placeholder="请输入进货人" class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label" >运费</label>
                    <div class="col-sm-6">
                        <input id="tax" type="number" placeholder="请输入运费" class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">付款方式</label>
                    <div class="radio i-checks">
                        <label class="">
                                            <div class="iradio_square-green" checked style="position: relative;"><input type="radio" checked="checked" value="1" name="checkout" style="position: absolute; opacity: 0;"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div> <i></i> 现金</label>
                                        <label class="">
                                            <div class="iradio_square-green" style="position: relative;"><input type="radio" value="2" name="checkout" style="position: absolute; opacity: 0;"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div> <i></i> 签单</label>
                                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label" >备注</label>
                    <div class="col-sm-6">
                        <input id="memo" type="text" placeholder="请输入备注信息" class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-3 col-sm-6">
                        <button class="btn btn-danger" type="button" id="submit">  提  交  </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="ibox float-e-margins">
    <div class="ibox-title">
        <h5>今日添加的进货订单(修改订单内容请在后台修改)</h5>
        <span style="float:right;">
    </div>
    <div class="ibox-content">
        <div class="table-responsive">
            <table class="table table-striped">
                <thead>
                    <tr>
                        <th>#</th>
                        <th>鱼的种类</th>
                        <th>进货单价</th>
                        <th>进货数量</th>
                        <th>运费</th>
                        <th>总价</th>
                        <th>进货人</th>
                        <th>时间</th>
                        <th>付款状态</th>
                    </tr>
                </thead>
                <tbody>
                    <?php
                        foreach ($myCreditList as $myCredit) {
                            echo "<tr>";
                            echo "<td>{$myCredit['id']}</td>";
                            echo "<td>{$myCredit['bankname']}</td>";
                            echo "<td>{$myCredit['price']}</td>";
                            echo "<td>{$myCredit['number']}</td>";
                            echo "<td>{$myCredit['tax']}</td>";
                            echo "<td>{$myCredit['amount']}</td>";
                            echo "<td>{$myCredit['person']}</td>";
                            echo "<td>{$myCredit['time']}</td>";
                            if($myCredit['payment'] == 0){
                                echo "<td>已付款</td>";
                            }else if($myCredit['payment'] == 1){
                                echo "<td>未付款</td>";
                            }else if($myCredit['payment'] == 2){
                                echo "<td>部分结清</td>";
                            }
                            //echo '<td><button class="btn btn-xs btn-danger" type="button" onclick="deleteBank('.$myCredit['id'].')">删除</button></td>';
                        }
                    ?> 

                </tbody>
            </table>
        </div>
    </div>
</div>
    </div>
    <script src="/static/js/jquery.min.js?v=2.1.4"></script>
    <script src="/static/js/layer/layer.js" charset="utf-8"></script>
    <script src="/static/js/plugins/iCheck/icheck.min.js"></script>
    <script src="/static/js/bank.js" charset="utf-8"></script>
    <script>
        $(document).ready(function () {
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
        });
    </script>
</body>

</html>
